package com.ruoyi.business.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.business.domain.Venue;
import com.ruoyi.business.mapper.VenueMapper;
import com.ruoyi.business.service.IVenueService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class VenueServiceImpl extends ServiceImpl<VenueMapper, Venue> implements IVenueService {
    @Resource
    private VenueMapper venueMapper;

    /**
     * 查询场馆列表
     * @return 场馆集合
     */
    public List<Venue> getAllVenueList(String name) { return venueMapper.selectAllVenueList(name);};

    @Override
    public List<Venue> getVenueList(Venue venue) {
        return venueMapper.selectVenueList(venue);
    }

    /**
     * 新增场馆数据
     *
     * @param venue 场馆
     */
    @Override
    public int insertVenue(Venue venue) {
        return venueMapper.insertVenue(venue);
    }

    /**
     * 更新场馆数据
     *
     * @param venue 场馆
     */
    @Override
    public int updateVenue(Venue venue) {
        return venueMapper.updateVenue(venue);
    }

    @Override
    public Venue getVenueById(long id) {
        return venueMapper.selectById(id);
    }
}
